<!DOCTYPE html>
<html>
  <head>
  <meta charset="utf-8">
  <title>Hello World</title>
  <!-- 开发环境版本，包含了有帮助的命令行警告 -->
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  <style>
  .active{
  font-size: 20px;
  color:rgb(235, 57, 86);
  }</style>
  </head>
  <body>
 <div id="app">
  <p class="active">您点击了{{counter}}次</p>
  <button v-on:click="addCounter">点击我查看效果</button>
</div>

 <script>
   new Vue({
     el: '#app',
     data: {
       counter:0
     },
     methods:{
         addCounter:function(){
             this.counter++;
         }
     }
   })
 </script>
  </body>
</html>